package com.itqf.controller;

import com.itqf.service.TbITemService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2020/11/12
 * @Time: 下午4:17
 */
@Component // <bean>   @Controller  springmvc
public class TbItemController {

//   @Autowired  //默认按照类型注入
//   // available: expected single matching bean but found 2: tbItemServiceImpl,tbItemServiceImpl1
//   @Qualifier("tbItemServiceImpl")  //注入成员变量时在 @Autowired  注解后使用   ，不能单独用

    @Resource(name =  "tbItemServiceImpl")
    private TbITemService tbITemService;

   public  void  testFind(){
       System.out.println(tbITemService.findAll());
   }


}
